<%@ page language="java" contentType="text/html; charset=UTF-8"
		 pageEncoding="UTF-8" %>
<%@ include file="/WEB-INF/public/head.jsp" %>
<title>添加资料</title>


<head>
	<script type="text/javascript" charset="utf-8" src="${system}/utf8-jsp/ueditor.config.js"></script>
	<script type="text/javascript" charset="utf-8" src="${system}/utf8-jsp/ueditor.all.min.js"></script>
	<script type="text/javascript" charset="utf-8" src="${system}/utf8-jsp/lang/zh-cn/zh-cn.js"></script>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

	<title>添加轮播</title>
<script type="text/javascript">
var ue = UE.getEditor('editor');
parent.initialize();
 setTimeout(function(){
  	UE.getEditor('editor').setContent('${video.content}', false);
     parent.subSomething();
  },3000);

	function save() {
	var file=$("#myfile");
           if($.trim(file.val())==''){
               file.attr("name","");
             }
           parent.initialize();
		jquerySubByFId('saveform', saveform_callback, null, "json");

	}
	//ajax调用的回调函数，ajax请求完成调用此函数，传入的参数是action返回的结果
	function saveform_callback(data) {
		parent.subSomething();
	  parent.message_alert(data);
	//  parent.$("iframe[src='video/queryvideo']").get(0).contentWindow.$('#list').$('#list').datagrid('load');
	  parent.parent.closemodalwindow();

	}
	


</script>
</head>
<body>


	<form id="saveform" action="${system}/video/updatesubmit"
		method="post" enctype="multipart/form-data">
		<input type="hidden" value="${video.id}" name="id"/>
		<TABLE border=0 cellSpacing=0 cellPadding=0 width="100%"
			bgColor=#c4d8ed>
			<TBODY>
				<TR>
					<TD background=images/r_0.gif width="100%">
						<TABLE cellSpacing=0 cellPadding=0 width="100%">
							<TBODY>
								<TR>
									<TD>&nbsp;轮播信息</TD>
									<TD align=right>&nbsp;</TD>
								</TR>
							</TBODY>
						</TABLE></TD>
				</TR>

				<TR>
					<TD>
						<TABLE class="toptable grid" border=1 cellSpacing=1 cellPadding=4
							align=center>
							<TBODY>

								<tr>
									<td height=30 width="15%" align=right>名称：</td>
									<td class=category width="10%">
									<input type="text" id="name" name="name" value="${video.name}"/>
									</td>
								  </tr>
								<tr>
								  <td width="15%" align=right>状态：</td>
									<td class=category width="25%">
									<input type="radio" id="name" name="status" value="1" checked="checked"/>横
									<input type="radio" id="name" name="status" value="0" <c:if test="${video.status eq 0}">checked="checked"</c:if>/>竖
									</td>
								</tr>
								<tr>
								     <td height=30 width="5%" align=right>视频：</td>
									<td class=category width="15%">
										<div>
										      ${video.video}<br/>
											 <input type="file" name="myfile" id="myfile" />(mp4)
										</div> 
								</tr>
								<tr>
								     <td height=30 width="5%" align=right>内容：</td>
								     <td>
								      <script id="editor" type="text/plain" style="width:1024px;height:500px;"></script>
								     </td>
								</tr>
								<tr>
									<td colspan=4 align=center class=category><a
										id="submitbtn" class="easyui-linkbutton" iconCls="icon-ok"
										href="#" onclick="save()">提交</a> <a id="closebtn"
										class="easyui-linkbutton" iconCls="icon-cancel" href="#"
										onclick="parent.closemodalwindow()">关闭</a></td>
								</tr>

							</TBODY>
						</TABLE></TD>
				</TR>
			</TBODY>
		</TABLE>
	</form>
</body>
</html>